lay cast
Note that it is not the mesh that is displayed, but only the collider and the collider.
It may be possible to set a filter to respond only to certain colliders
MeshCollider must be Convex
If a ray is flown from a vertex on the MeshCollider, it will hit
code:cs
Ray pointerRay = new Ray(pointer.position, pointer.forward);
RaycastHit hitInfo;
if (Physics.Raycast(pointerRay, out hitInfo, _MaxDistance))
{
GameObject obj = hitInfo.collider.gameObject;
---
This page is auto-translated from /nishio/レイキャスト. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.